<?php
session_start();
require('../config.php');
if(isset($_SESSION[sess_login])){
		include("../connect.php");
		$array_list = '';
		$command = "SELECT `id` , `path` , `name` , `icon` , `datecreate` , `description`, `groupdisplay`";
		$command .= " FROM `photo_album`";
		$command .= " WHERE `owner` = '".$_SESSION[sess_login]['id']."'";
		$result = mysql_query($command, $conn);
		if (@mysql_num_rows($result)!=0){
			while ($row = mysql_fetch_row($result)){
				$array_list[] = $row;
			}
		}
		@mysql_free_result($result);
		mysql_close($conn);
		
		echo '{"aaData":'.json_encode($array_list).'}';
}
else {
	echo '<center><br /><br />Please Login</center>';
}
?>